<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{{.pageTitle}}</title>
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="shortcut icon" href="{{ getAssets }}i/favicon.ico" type="image/png">
    <link rel="stylesheet" href="{{ getAssets }}css/amazeui.min.css?v={{ assets_version }}" />
    <link rel="stylesheet" href="{{ getAssets }}css/amazeui.datatables.min.css?v={{ assets_version }}" />
    <link href="{{ getAssets }}css/select2.css?v={{ assets_version }}" rel="stylesheet">
    <link rel="stylesheet" href="{{ getAssets }}css/app.css?v={{ assets_version }}">
    <meta name="csrf-token" content="{{.xsrf_token}}" />
    <script language="javascript">
        var WG = {
            name : '{{.department.Name}}',
            fullname : '{{.department.FullName}}',
            telephone : '{{.department.Telephone}}',
            address : '{{.department.Address}}',
            shopowner : '{{.department.Shopowner}}',
            shopownerTel : '{{.department.ShopownerTel}}'
        };
    </script>
</head>

<body data-type="widgets">
    <div class="tpl-g">
        <!-- 头部 -->
        <header class="am-print-hide tpl-header-margin-left">
            
            <!-- 右侧内容 -->
            <div class="tpl-header-fluid">
                <!-- 侧边切换 -->
                <div class="am-fl tpl-header-switch-button am-icon-list">
                    <span></span>
                </div>
                <!-- 搜索 -->
                <!--<div class="am-fl tpl-header-search">
                    <form class="tpl-header-search-form" action="javascript:;">
                        <button class="tpl-header-search-btn am-icon-search"></button>
                        <input class="tpl-header-search-box" type="text" placeholder="搜索内容...">
                    </form>
                </div>-->
                <!-- 其它功能-->
                <div class="am-fr tpl-header-navbar">
                    <ul>
                        <li class="am-hide-sm-only am-text-sm">
                        	<a href="javascript:;" id="admin-fullscreen" class="tpl-header-list-link"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a>
                        </li>

                        <li class="am-dropdown am-text-sm">
                            <a href="javascript:;" class="am-dropdown-toggle" data-am-dropdown-toggle>
                                欢迎你, <span class="tpl-header-list-user-nick">{{.department.Name}}-{{.backenduser.RealName}}</span><span class="tpl-header-list-user-ico"> <img onerror="javascript:this.src='{{ getAssets }}img/user06.png';" src="{{.backenduser.Avatar}}"></span>
                            </a>
                        </li>
                        <li class="am-hide-sm-only am-text-sm">
                        	<a href="javascript:;"  class="tpl-header-list-link" id="admin-clearchche"><span class="am-icon-refresh"></span> <span>清除缓存</span></a>
                        </li>
                        <!-- 退出 -->
                        <li class="am-text-sm">
                            <a href="{{ urlfor "LoginController.Logout" }}">
                                <span class="am-icon-sign-out"></span> 退出
                            </a>
                        </li>
                    </ul>
                </div>
            </div>

        </header>
        <!-- 侧边导航栏 -->
        <div class="left-sidebar am-print-hide">
            <!-- 用户信息 -->
            <div class="tpl-sidebar-user-panel">
                <div class="tpl-user-panel-slide-toggleable  am-text-center">
                    <img src="{{ getAssets }}img/logo-small.png" width="40">
                </div>
            </div>
            <!-- 菜单 -->
            <ul class="sidebar-nav" id="pageSidebar"></ul>
            
        </div>
		<div class="sidebar-sub-box" id="sidebarSubBox">
        	<div class="menu-submenu-title">
            	<span id="sidebar-title-value"></span>	
                <a class="siderbar-appmenu-submenu-pinbtn" href="javascript:void(0)"><i class="am-icon-long-arrow-left"></i></a>
            </div>
        </div>
        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div id="mainPageContent"><div class="row-content am-cf">{{.LayoutContent}}</div></div>
        </div>
    </div>
</body>
{{template "shared/globaljs.html"}}
<script>
        $(function () {
           //页面左侧菜单初始化
           wbs.pageSidebarInit({
                slideBarBox:'#pageSidebar',                         //菜单容器
                url:'{{urlfor "ResourceController.UserMenuTree"}}', //菜单数据地址
                cur:'{{.activeSidebarUrl}}'             //当前激活的菜单地址
           });
		   
		   $('#admin-clearchche').click(function(){
				$.get('{{ urlfor "HomeController.ClearCache" }}', function(j) {
					if(j.code == 1) {
						layer.msg("缓存清除失败")	
					} else {
						layer.msg("缓存清除成功")	
					}
				});
				return false   
		   });
        });
 </script>
{{.footerjs}}
</html>